home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 55
/
MINAMI55.ISO
/
Varios
/
Juegos
/
03 - Red_Ninja.swf
/
scripts
/
DefineSprite_122
/
frame_9
/
DoAction.as
< prev
Wrap
Text File
|
2004-10-04
|
1KB
|
41 lines
man_h = getProperty("/map/p", _height) / "2";
man_w = getProperty("/map/man", _width) / "2";
wall_h = _height / "2";
wall_w = _width / "2";
man_x1 = getProperty("/map/man", _X) - man_w;
man_x2 = getProperty("/map/man", _X) + man_w;
man_y1 = getProperty("/map/man", _Y) - man_h;
man_y2 = getProperty("/map/man", _Y) + man_h;
wall_x1 = _X - wall_w;
wall_x2 = _X + wall_w;
wall_y1 = _Y - wall_h;
wall_y2 = _Y + wall_h;
if("3000" < distance)
{
gotoAndPlay("a" add act);
}
act = random("5") + "1";
if(distance < "3000")
{
if(wall_x2 - "30" < man_x1 and wall_y1 < man_y1 - "20" and man_y2 < man_y2 + "20")
{
gotoAndPlay(47);
}
else if(man_x2 < wall_x1 and wall_y1 < man_y1 - "10" and man_y2 < man_y2 + "10")
{
gotoAndPlay(59);
}
else if(wall_y2 < man_y1 + "10" and wall_x1 < man_x1 - "5" and man_x2 < man_x2 + "5")
{
gotoAndPlay(53);
}
else if(man_y2 < wall_y1 + "10" and wall_x1 < man_x1 - "10" and man_x2 < man_x2 + "10")
{
gotoAndPlay(41);
}
else
{
gotoAndPlay(64);
}
}